prepare for command line run