finishing off tests
refactoring