added code that just exit if no args passed