query_return function

Signed-off-by: Michael Liang <ml09@inf.ufpr.br>