new tests for scoping functions