implement basic printing for classes and decorators