ie8 polyfill - first attempt