update_measurements function
fixed bugs regarding the measurement pre-population