added a quite bizarre csv parser