split out the database to its own module, better early than later