added a function to parse user input into separate arguments