matrix relies more on internal data rather than dom structure, add tests