tested the condations and all outcomes work out. Added descriptions of the script.