- update javascript API to match java