What was the purpose of the Black Codes?

Group of answer choices

A) to allow formerly enslaved people to buy property

B) to ensure freed Black people would receive equal pay

C) to provide formerly enslaved people with the ability to vote

D) to restrict the rights of formerly enslaved people