mostly generating routines