minor update for function and var-scopes