Recoded db_connection method so it returns a hash now