Update commonfunctions.py