Vilnius Magistrate was responsible for the city economy, was collecting taxes, taking care of the city treasury, was accumulating stocks of grain in order to avoid residents starvation in case of famine or wars. He also acted as a notary in transactions, testaments and as a judge during the city residents conflicts that involved new buildings constructions and reconstructions. His other function was taking care of the city craftsmen. From the beginning, statutes of workshops were approved by the ruler himself. Later, Sigismund II Augustus granted this privilege to the city magistrates in 1552. Since the 1522 privilege by Sigismund I the Old, Vilnius Magistrates had the responsibility to protect the city and its resident's tranquility by having 24 armed guards. During war times, the night watch was performed by three jurisdictions – magistrate, bishop and castle men.