major refactor of tests