added address comparison and ranges