modify code according to jslint guidance.