 In exchange, the Sejm allowed him to raise taxes and push a number of reforms strengthening the military, including the establishment of the "piechota wybraniecka", an infantry formation composed of peasants.Many of his projects aimed to modernize the Commonwealth army, reforming it in a model of Hungarian troops of Transylvania.He also founded the Academy of Vilnius, the third university in the Commonwealth, transforming what had been a Jesuit college into a major university.