finally fixed search compiler errors