adding the beginnings of the encoder reader