add thread.rb