made facility update function