abstracted db layer