reset variables before resuing them