moved GA code according to recommendations