wip for some refactoring the idea