code optimized for notify dialog
code for review optimized