some progress on monad definition