modulize dialog