refactoring spec