placed missing semi colon
adding requestAnimationFrame function to comparison