What does Epictetus mean by “moral purpose in harmony with nature”? How can it lead to freedom and happiness?

What does Epictetus mean by “moral purpose in harmony with nature”? How can it lead to freedom and happiness?