added some commandline argument processing for using the tool