adding gcm functionality