Drug and device companies shelled out $8.4 billion to doctors and teaching hospitals in 2017, including payments to doctors for meals and travel.

The Centers for Medicare and Medicaid Services on Friday released the 2017 payment data for doctors and teaching hospitals. Doctors and teachers received $8.4 billion, which is slightly below the total in 2016.

The biggest amount, $4.7 billion, went to research. Coming in second was $2.82 billion for general payments, which include items such as meals, travel to speaking events, and speaking fees.

Doctors also received $927 million in ownership stakes in companies, CMS said.