interchange order of sourcing function and setting up db