added a few tests

TODO: get scalacheck working with scalaz
OR: remove scalaz by refactoring use of State monad into a foldleft with tails