added support for command line arguments