adding the ability to encode only the basic entity as well as convert others to numeric entity