made some changes for dwr js function