modified to take an URL as command line parameter