create an inner scope for functions, and call functions with the containing scope