some small modification on .js