made changes in javascript