reorganize traverse.c
gracefully handle functions declared as parameters