added commandline parameter support