use a loop to get the output of an EXECUTE