refactored out some code that only existed for the tests