working on the js call