added onclick query with selected terms