implemented video loop