move url parsing to Url class