wip on JS api