removed useless global variable "grandTotal"