handle multiple pids