dialog functions for user interaction exercise