Adopted aries style recovery script