find_location: replaced while loop with .each