refactoring dictionary encoding for non string types after comments #127