refactoring tests according to Dominic's notes