added pr function