Added instantiate function to decide which DB it is