modified error handling methods