Reverting to previous logic that got lost in a merge, but retaining safer variable syntax