setting up db methods.