got history index painting STARS working, javascript