Propulsion and guidance in a simulation of the worm