Wrote first function with new imperative monad