worked on Error Handling