entities refactored