fixed up search stuff