update sample code to polyfill