updated rules to allow entity type