PAIR processing script