fix either monad. unit tests for either monad