removed unused code in js