moved label outside iteration