Added function for URL parsing