added apple apn logic