adding/refactoring tests