entries controller refactoring