rewrite fbb.js