refactoring view decorator