recursive traversal with jslib