refactored csv2json module