add pieces.js file