refactoring to hold the DB constructs in a seperate module