added block.js; fixed bug