identify function for plotDist improved