added some code for push notifications