entit refactor