wip on refactor
merge master