added command line functionality