passing tests after refactors