Changed sortByPID to use the gapped PID function.