#93 refactoring Codec: finished