added some csv parsing code