update javascript to reflect routing changes