added more loosely coupled boilerplate db code for CRUD operations