changed to only post process if successful