added code to parse args and create value pairs