finish monad
fix bugs