Added gcm functionality