js recursion tricks