More trapd code