ported algos to js. now a SPA