revise exit and traps