adding JS API