make Encoder public