added Exception Handling
added Exception Handling