Changed curve algorithm.