Few people would make the case that we should encourage gambling. But what if gambling could be used as a ploy to improve road safety, recycling, school attendance, the financial well-being of citizens, and society as a whole?

Next month, reports the Baltimore Sun, banks and credit unions in Maryland will be allowed to start hosting raffles and lotteries. There will be cash prizes, but the financial institutions will not be selling tickets. Instead, the lotteries are what are called “prize-linked savings programs” in which anyone who makes a deposit is automatically entered for a chance to win.

Everyone knows that they should save money, of course, so there should be no need for such incentives. But the chances of people actually doing what they are supposed to do vastly increase when there’s also a chance that doing so could win them money. Lotteries, in fact, are being used not only to promote savings, but to encourage all sorts of behavior that’s good for society. Here are eight examples:

Saving Money
Maryland will be following the examples set in the U.K., where cash prizes are used to encourage citizens to buy savings bonds, and Michigan, which since 2009 has allowed credit unions to hold lotteries; anyone making a deposit of $25 or more is entered to win.

Complying with Tax Codes
An op-ed published earlier this year in the New York Times by Richard H. Thaler, a professor of behavioral science and economics at the University of Chicago and the co-author of Nudge: Improving Decisions About Health, Wealth, and Happiness, listed several lottery systems intended to reward behavior that’s good for society. Among them: In China, many restaurants are mostly cash businesses, making it easy for them to underreport income. To remedy the situation, restaurants have been supplied by the government with receipts that include scratch-off lottery tickets on them. Customers are likely to ask for receipts because of the lottery, and therefore more receipts are likely to be reported.

Cleaning Up After Your Dog
In New Taipei City, Taiwan, citizens are given a lottery ticket for each bag of dog excrement dropped off. Dozens of cash prizes have been awarded, including some over $2,000. In Mexico, there’s a different twist on encouraging people to clean up after their pets: AdAge highlighted a program that provides free Wi-Fi in Mexico City parks when they drop off dog poop in a specially designated box.

Going to School
Yes, you can get a reward just for showing up. Students in Massachusetts, New York, and Ohio have been given free laptops, Old Navy gift cards, and cash, respectively, for good attendance in school. At Texas’s Fort Worth Independent School District, meanwhile, all high school students who have perfect attendance for one six-week grading period are entered into a lottery with the chance to win a Dodge Challenger.

Voting
A few years ago, Arizona Voter Reward Act was proposed as a means to improve voter turnout. The bill didn’t pass—voters rejected it on the ballot—but if it had, citizens who voted in primary and general elections would have automatically been entered into a $1 million lottery. One critic of the proposal wrote that the act framed “democracy as a crapshoot, a high-stakes game that requires no effort or thought.” Another said, “The last thing we need is for people to vote without thinking, other than thinking about winning the million dollars.”

Driving Under the Speed Limit
Everyone has heard of roadside cameras that capture evidence of speeding or other traffic infractions, and the fines that come as a result. To encourage safer driving, a “speed-camera” lottery in Sweden uses positive, rather than negative reinforcement. All drivers who pass by cameras going under the speed limit become eligible to win cash prizes—money gathered as a result of (yep) speeding tickets.

Taking Prescription Medications
Studies have shown that one year after starting a prescription medicine, roughly half of patients aren’t taking them as directed. To increase the chances meds are being taken correctly, insurance companies have been testing a lottery with prizes of $10 to $100. Electronic monitors are used to track whether individuals are taking their prescriptions, and all who are have a chance to win cash daily.

Recycling
There are many incentives for recycling; the most obvious may be the 5¢ or 10¢ deposit one is given for returning bottles and cans in many states. Vermont’s Recycle & Win program manages to encourage recycling and the lottery at the same time. When non-winning Instant Tickets are mailed or dropped off to be recycled, they also count as entries into a cash drawing that’s held every three months. The program gives residents good reason to recycle—and to play the lottery (multiple times) as well.

Brad Tuttle is a reporter at TIME. Find him on Twitter at @bradrtuttle. You can also continue the discussion on TIME’s Facebook page and on Twitter at @TIME.