var decls outside of loop