added comments to selector.js