Execption Handling Added