'tail_and_save' function added to alloy.py