refactors tests, ends section 5.3.4