improved the csv read method