 After graduating, he spent a few months at Royal Botanic Gardens, Kew, where he met Charles Darwin, William Hooker and Joseph Hooker, and James Brooke, the first rajah of Sarawak.The latter connection lead to him spending 3 years from 1865 to 1868 undertaking research in Sarawak and Brunei on the island of Borneo and on other islands off present-day Indonesia, Malaysia, and Papua New Guinea.He spent most of his time in Indonesia (then Dutch East Indies) and was believed to be able to speak Malay, Javanese, and Sundanese fairly fluently.