updated nag logic