update onion and move the util to the mace lib