Wrote lib.js