added 3x3 matrix input