updated csv parsing