added rough draft of jsAlgo