Why does Henry David Thoreau write his book “Walden” ?

Why does Henry David Thoreau write his book “Walden” ?

A. To show ideas of transcendentalism are put into action
B. To critique slavery
C. Tell his entire life story
D. None of the above