added command line arguments and error handling