added stack local vars