now outputs mats for verification