fix march algorythm