added the option to specify the url