updating firebase correctly