tests refactored, uncommited tests added