reinstate function wrapper