removed unnecessary code from js