code review of gizapp , focus on the em procedure