Use closure to maintain scope.