Korean language is kinda frustrating many English speaker due to it's word order haha.
You gotta remember the usage of "~기"
It is a magical word which make a sentence to noun clause.
For example, let's say, 산책 안하다.
Meaning, I don't take a walk.
If you replace 안하다 to 안하기, than it will become "that I don't take a walk"(noun clauses)