A new study found that the best way to get people to quit smoking was to bribe them.

Published in the New England Journal of Medicine, the study found that even more important than rewarding people with cash if they quit was the threat of losing money if they weren’t successful.

By comparing five different smoking cessation techniques among over 2,000 CVS Caremark employees, the study found that techniques requiring an up-front cash deposit that would be taken away if the participant didn’t successfully quit were much more effective than those that simply offered a cash reward.

“It leveraged people’s natural aversion to losing money,” lead author Dr. Scott Halpern of the Perelman School of Medicine at the University of Pennsylvania told Reuters.

Many more people were willing to enroll in a simple reward-based program than to put down money up front, but according to Halpern, the deposit programs were twice as effective as the more popular reward programs, and five times more effective than providing free non-smoking aids like nicotine replacement therapy.

The study found that group programs were no more effective than individual-based ones.

“The trick now is to refine the deposit programs so they’ll be more popular without losing much, if any, of their effectiveness,” Halpern told Reuters Health.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Tessa Berenson at tessa.berenson@time.com.