make sure variables are set before the first time run.