coded argument parser
fixed parse bug and test passes