fixing dense matrix, completing testcase for 100% coverage. sparse
matrix will follow