Removal the useless global variable "difference"