this javascript animates a marker between two points. Can you change the marker to a square polygon. '// starttrain
                  const firstPoint = L.latLng(
                    firstCityCoords[1],
                    firstCityCoords[0]
                  );
                  const secondPoint = L.latLng(
                    secondCityCoords[1],
                    secondCityCoords[0]
                  );

                  const intervalDuration = 10; // milliseconds per frame
                  const distance = firstPoint.distanceTo(secondPoint);
                  const steps = ((distance / speed) * 1000) / intervalDuration; // Assuming speed of 35 miles per hour
                  const latStep = (secondPoint.lat - firstPoint.lat) / steps;
                  const lngStep = (secondPoint.lng - firstPoint.lng) / steps;

                  // Create the marker and set its initial position
                  marker = L.marker(firstPoint).addTo(map);

                  const moveMarker = (speed) => {
                    if (progress < steps) {
                      const newLat = firstPoint.lat + latStep * progress;
                      const newLng = firstPoint.lng + lngStep * progress;
                      const newLatLng = L.latLng(newLat, newLng);

                      marker.setLatLng(newLatLng); // Update the marker's position

                      progress++;
                      setTimeout(function () {
                        moveMarker(speed);
                      }, intervalDuration);
                    } else {
                      // Marker reaches the second point, update money
                      money +=
                        Math.floor(Math.random() * (2000 - 1000 + 1)) +
                        1000 * numberOfCarriages;
                      const moneyDisplay =
                        document.getElementById("moneydisplay");
                      const moneyString = `£${money}`;
                      moneyDisplay.textContent = moneyString;

                      // Wait two seconds before animating back and call moveBackMarker recursively
                      setTimeout(() => {
                        moveBackMarker(speed);
                      }, 2000); // Wait for 2 seconds (2000 milliseconds)
                    }
                  };

                  const moveBackMarker = (speed) => {
                    // Corrected calculation for animating back from second point to first
                    if (progress > 0) {
                      const newLat =
                        secondPoint.lat - latStep * (steps - progress);
                      const newLng =
                        secondPoint.lng - lngStep * (steps - progress);
                      const newLatLng = L.latLng(newLat, newLng);

                      marker.setLatLng(newLatLng); // Update the marker's position

                      progress--;
                      setTimeout(function () {
                        moveBackMarker(speed);
                      }, intervalDuration);
                    } else {
                      console.log("Reached starting point again.");
                      // Add random number to money and update display
                      money +=
                        Math.floor(Math.random() * (2000 - 1000 + 1)) +
                        1000 * numberOfCarriages;
                      const moneyDisplay =
                        document.getElementById("moneydisplay");
                      const moneyString = `£${money}`;
                      moneyDisplay.textContent = moneyString;

                      // Reset progress for next round trip
                      progress = 0;

                      // Recursively call moveMarker to start next animation cycle
                      moveMarker(speed);
                    }
                  };
                  moveMarker(speed); // Start the animation'