rename "typeid" to "type"