improving url handling