Changed typeID to encoding