add an abstraction layer separating out db-4 specific code