tidied up tower of hanoi solution