Added some new handy python functions