implement Finding a shared motif