Modification of move algorythm