functions for ROC.R