[WIP] work in progress - refactoring