snippet on how to create decorators which are classes