Implemented growing function with asm.js