Adding twist on monad writer example