Adding constructor in url class