fixing up decorators and contextmanagers