wip refactoring