New algorythm