improve private var handling