cleaning up tests, making log function a dependency