Solved word search problem