small changes to read encoders value