added port of node.js parth.js with passing tests