finish the code frame of Threading version