adding dialog and user input