added matrix tests