added support for encoder control