update CSV reader; bug fixes