minor tweaks to leap method