added exception catch
corrected
minor adjustments