refactor leap