fixed scope problem of local vs. program variables