refactoring: work in progress