further mods to measurement script