HW3 Part3: added functionality for checking a url instead of a file