functional version of esa-NE-repeats.c with debug msgs