Got the Route Function to Work