saved gc1_refactored.js