more work on refactoring tests
merged from remote