updated main slightly
found out by experiment which argument is which for the Matrix type