search logic added