use global class for db