encoder works