small changes to SparseVector class