He was an unsuccessful competitor for the Burnett prize offered in 1811 for an essay on the existence and attributes of God. The work which he then wrote, and which in his own judgment was his best, was published in 1820, under the title of "An Attempt to demonstrate from Reason and Revelation the Necessary Existence, Essential Perfections, and Superintending Providence of an Eternal Being, who is the Creator, the Supporter, and the Governor of all Things" (2 vols 8vo). This procured him the degree of MA from the university of Aberdeen.