implemented either monad