refactored entity type controller