add program to find first seen terms