completed the error handling methods