change algorythm