Implemented user interaction functionality.