NEW: added extension setup and teardown function decorator