added command line parser and more options