Update thread.js