refactoring (WIP!!!)