more helper routines getting ready to switch db to mongodb