add matching words algorithm, needs fixes?