implement query term search
implement query term search
added funtion's prototypes
index intersection