Defined global python functions