refactoring 11-12: use decorator