Maybe better logic for getting the number input from the user.