switched matrix tests to arrays