decorator refactoring