Return generated table instead of assigning it to a global variable.