changed csv.open to csv.read, set market id to id instance variable.