update write_gcm