wrapper class for database connection