a simple CCD algortihm for walking