Updated traf

Updated trap to have a write method