starting logic for keyword search