final commit before new method
implemented improved movement algorithm