major refactor
tests refactor