I am wondering why you chose to change the function itself, and not just call it in a for loop?
The name is now a bit deceiving, containsCoordinate versus containsCoordinates