some python functions