bug fixed jshint passed almost