add query structure