save favorites to database