initial step for refactoring script_dialog