working version of recursive version of hanoi