initial code for sparse matrices

*** INCOMPLETE ***