updated GA code