Added methods for user input thread