multiple pid extraction script