added some tests and some test helpers