persist favorites to localstorage