update code by jshint check