use jQuery.map to eliminate polyfill, add code commenting, change variable name