after first pass of refactoring