refactoring: extract input dialog as reusable code