min refactor for unit test