C3PO walking code