Some additions in javascript