changed code to get multiple user input values