algorythm modified for launch