add scope join and tests for thread