add handy python functions