Updated GA code