added check for URL
cleanup