refactoring on feedscontroller to remove data access code