add Mat and Mat scanning