 In 1886–1918, he taught at the Saint Petersburg University as a "privatdozent".The subjects included bibliography, Lithuanian and Latvian languages and ethnography, ancient history of Lithuania.He supported Lithuanian and Latvian students, including Pranas Vaičaitis, Povilas Višinskis, Kazimieras Būga, Antanas Smetona, Rainis, .