added abstract base class Entity instead of NamedEntity