wrapper class for Encoder