implement entity types and main type