updated measure.py