implemented term search