udpate functions.py