encoder class (possible useless)