refactors some test