add GCD in AS, MMAS (performance doubled.)