Designing movement algorithm.