fix for running with old csv format
speedups