add tests for optional scope