cross references and complex types - almost done