modification:
1.merge index_func.js into index.js so APIs can interact more
  naturally.