adjust autoplay script