played around with state monad