added matrix.c