updated tests, added assertScopesFinished