refactors tests and delegation