added type_code to schema