removed errors- Handled exceptions