finish basic Mat data structure