ball and gate finding