fix silly mistakes in reader; have one internal function rather than two