Determinging the next direction to go...I think