legality of government spending