process method created to handle processing user input