better filtering for existing pid