use existing basename variable