added comments: trap.[ch]