added gcm functions