moved some routines to bbio/util.py so drivers can access them