refactor GCD with AutoGrid