wip
Implement Encoder