un-commented error handling code