try to use promise to modify fav function