add searchWord function