csv reference sort implemented