added Hamcrest matchers and some new tests