updated with URL check and parsing