use sparse matrix
added main.m