moving algo done