setting up for full db function in switch