substantial refactoring