 He learned Arabic and studied both Buddhism and Daoism.He also wrote several works on Islam in 1674, 1710, and 1721.His writings became part of the Han Kitab, a collection of literature which synthesized Islam and Confucianism.