class better than function to handle 2 URLs
delegate based on URLs
avoid hardcoded URLs abstract it out