test matrix perms