database: switched to class