adding more error handling methods