refactor jackpilot