added bind polyfill and some code comments