replace local storage with firebase