add instanceof usage
add thread test.