augmenting die function
use a single global database connection