refactoring to improve spec quality