#29 refactoring (wip)