refactor unit tests..