major refactor of testing file