Can you provide a function for this case? Not sure how to handle the set of locations