work on session binding.
tweak function scope.