movement algorithm cleaning.