Minor changes in search method.