query-loop stub