OK encoder