papply script