refactoring, introduce DialogMaker class