refactoring (WIP)