added command line options and documentation