refactored favorites controller