finished implementation of command line usage