refactored argument_parser(), merged functions