redefining matrix