update python functions