minor refactoring, added notifications for push and pop