Updating sccs alg for acceptable memory usage.