Add code snippets related to favorite related func