refactor gcm and gcam :octocat: