I am trying to create an image gallery as shown below where each "polaroid" div can have multiple images to scroll through. The issue I am having is that everytime a user clicks on the left/right arrow, it not only scrolls through the one polaroid div, it continues to scroll to the other ones too. What I want to try to achieve is for each individual polaroid div, I want the user to scroll through the images for that specific div. I was wondering what could I do/change in my existing code to achieve that?

```js
 var slideIndex = 1;
showSlides(slideIndex);

// Next/previous controls
function plusSlides(n) {
  showSlides(slideIndex += n);
}

// Thumbnail image controls
function currentSlide(n) {
  showSlides(slideIndex = n);
}

function showSlides(n) {
  var i;
  var slides = document.getElementsByClassName("mySlides");
  var dots = document.getElementsByClassName("dot");
  if (n > slides.length) {slideIndex = 1}
  if (n < 1) {slideIndex = slides.length}
  for (i = 0; i < slides.length; i++) {
      slides[i].style.display = "none";
  }
  for (i = 0; i < dots.length; i++) {
      dots[i].className = dots[i].className.replace(" active", "");
  }
  slides[slideIndex-1].style.display = "block";
  dots[slideIndex-1].className += " active";
}
```

```css
.gallery {
    display: flex;
    flex-wrap: wrap;
}
div.polaroid {
  width: 30%;
  background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
/*  margin-bottom: 25px;*/
  margin-left: 35px;
  margin-top: 50px;
}

div.container{
  text-align: center;
  padding: 10px 20px; 
}

#polaroid a:hover{
    color: #3a92c8; 
}
/* Slideshow container */
.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
}

/* Hide the images by default */
.mySlides {
  display: none;
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}
```

```html
  <div class = "gallery">

    <div class = "polaroid">
            <div class = "slideshow-container"> 
                <div class="mySlides fade">
            <img src="https://scottberkun.com/wp-content/uploads/2016/09/fun-1012680_960_720.jpg" alt="website layout" style="width:100%" class="visible">
                </div>
                   <div class="mySlides fade">
            <img src="https://www.todaysparent.com/wp-content/uploads/2020/03/family-activities-battle-coronavirus-cabin-fever-1280x720-810x454.jpg" alt="website layout" style="width:100%" class="visible">
                </div>    
            <!-- Next and previous buttons -->
            <a class="prev" onclick="plusSlides(-1)">&#10094;</a>
            <a class="next" onclick="plusSlides(1)">&#10095;</a>                
        </div>

            <div class ="container">
        <p>  A website created using Wix for a life coach, podcast services startup. </p>
            </div>

    </div>  

     <div class = "polaroid">
           <div class = "slideshow-container"> 
                <div class="mySlides fade">
            <img src="https://scottberkun.com/wp-content/uploads/2016/09/fun-1012680_960_720.jpg" alt="website layout" style="width:100%" class="visible">
                </div>
                   <div class="mySlides fade">
            <img src="https://www.todaysparent.com/wp-content/uploads/2020/03/family-activities-battle-coronavirus-cabin-fever-1280x720-810x454.jpg" alt="website layout" style="width:100%" class="visible">
                </div>    
            <!-- Next and previous buttons -->
            <a class="prev" onclick="plusSlides(-1)">&#10094;</a>
            <a class="next" onclick="plusSlides(1)">&#10095;</a>                
        </div>
            <div class ="container">
        <p>  A website created using sqaurespace for an accounting services business.</p>
            </div>
    </div>

    <div class = "polaroid">
           <div class = "slideshow-container"> 
                <div class="mySlides fade">
            <img src="https://scottberkun.com/wp-content/uploads/2016/09/fun-1012680_960_720.jpg" alt="website layout" style="width:100%" class="visible">
                </div>
                   <div class="mySlides fade">
            <img src="https://www.todaysparent.com/wp-content/uploads/2020/03/family-activities-battle-coronavirus-cabin-fever-1280x720-810x454.jpg" alt="website layout" style="width:100%" class="visible">
                </div>    
            <!-- Next and previous buttons -->
            <a class="prev" onclick="plusSlides(-1)">&#10094;</a>
            <a class="next" onclick="plusSlides(1)">&#10095;</a>                
        </div>
            <div class ="container">
        <p>  A website created using squarespace for a photography and beauty services startup.</p>
            </div>
    </div>  

    </div> <!---- THIS DIV IS FOR THE div = gallery layout to make elements on one row-->
```