Finished the measurementBasedUpdate function.