added the encoder variable