refactor gcm done