[functions] moved entity to base classes