moved some test code from the module into the tests