split a function into two. (A query execute function and a reporting fuction)