Added favoriting code and explanation