putting GCM code