#14 refactor encoding implement (1)