added handle_completed method to Job