learning to make requestNextAnimation frame that works with browser specifics