added sparse matrixes and lots of tests