added db config and helper methods