added some url handling