search logic done