creating matrix view