fixed the failing test for the previous refactoring