Implement user input and prevent errors