Helper routines library