update favorite and history