changed working algorithm to algorithm 3 (described in scripts/analyse-csv-3.rb)