Tests on general algorythm