added a bunch of unit tests