final update for firebase