implement leapfrog