Compare refactored