tiny refinement to the prto function