encoder

encoder control added