storing current leg as you click around route