roc script changed to standard sorting and counting method