Checking Url with function and main