Added some utiltiy routines