quadratic encoder mock