error monad in more places