Why did president Nixon make his trips to China and the Soviet Union?

Nixon tried to get on good terms with China as well as the Soviet Union by making these trips---so he could make peace...