added moves to the cost function