add job cleanup functionality