Weighted Kwak's Algorithm fixed.