Updating code sample for locating bridges