matrix parser