implemented full CRUD functionality for favorites