change var name to indexOfFirstPlaceholder to make clearer