added gateway complete notification
removed unused code