finished fixed GCM implementation