Avoid passing results via global variables