search fixed (needs testing)