move function for atom render to util
use requestAnimationFrame