update the method of caculating score