working on the sprase vector unifiying. Do not use this version.