clean GA function