Using requestanimationfrmae