some scary csv utilities