Simpler code (freeze.js)