almost done with toy.js