Added dispenseCandy function