Space robot code from pg. 599