added commented out sparse chainsolve implementation