refactor to conform to new unit test