rename index as typeId