declare variables outside of for statement