added #gp trap mechanism