finished new GCM implementation