Create thread.js