wired up the database