added hooks for postprocessing