searching part is revised