updated with nobm's conditional GA script