modify trap_dispatch in trap.c and finish exercise6