Fixed Encoder to match test file