Rewritten with node.js and ajax