Added some convience functions for python