updated to use sortPMSfiles anywhere