Small python routines for re-using