part 3: modification to accept --url