Added a constructor for when user input is an integer