added comments trap.[ch]