working  database connection