added request animation frame