added commandline support