tidied up towerofhanoi solution