Add ugly solution to an state monad exercise