additional error handling methods added
typo corrected