upgraded dialogBuilder method, back to working application