all algorythms now have only one branch of code