changed to read user input