refactoring (wip)