Add encoder and some test
Merge branch 'feature/encoder' into develop