new stopping algorithm in place. It needs extensive testing