partial refactor (breaking tests)