half made the Encoder