minor changes but working for 1st search ok