matrix cpp class....