summaryP: new function