rename variable and fix jshint semicolon issue