Quad encoder class