created searchWord function and added to letters