guard for pid