declare a few vars as local