Added conditional GA code