added favourites backend logic