Added Exception Handling