finished basic db methods