use requestAnimationFrame instead of set interval
give up on xhtml