Update miner.js

createBox function added