first gcm implementation