optimize
copy brick.js