using from_location() function to speed up highlighting