It seems you only need one **Cursor** and one **do{}** loop, plus an **if** to distinguish between **FAVORITE** and **UNFAVORITE**.