node.js implementation of an idea totally ripped off from Fenntera