declare variable `values` only in block where it is used