assignment8

added exception handling