added error handling, spelling