created a different ret variable so as not to overwrite the toplevel ret variable, that we use later