adding the hanoi moves problem solved using the state monad