add flatten and some specs for monad laws