generic db and global vars