added comments to JS