new api, js improvements..