added typeId to the indices