add database connection
add db connection in stats