added a bunch of unit tests for validation