added firebase update function