modified to support lexical-binding.