added support for command line arguments -h and -n