add db switching changes