8. Handling user input