Updated square.js