complete rewrite, no interaction yet, shows snake behaviour with autopilot