Added Some Error Handling the previous function