sparse matrix impl; smart vector improv