implement reading