Why did Romans create a written code of law?

to confuse their enemies and block invasions

to allow citizens to see and understand the law

to spread literature throughout the republic

to serve as the basis for a new religion