changed from hard-coded integer values to prompting user for input