added random url handling