refactor encoding property