Added functions for user interaction