changed driver from c struct to c++ class