refactors tests