refactoring. add entities controller