Added sparse matrix impl