refactor feeds_controller with better error handling