added refactoring tests