added a test class for handling exceptions. To be continued
moved exception handling to separate class