add comments to js, removed unnecessary code line 10