fixed bugs counting result vector in simple sweep method