revise error paths