testing write js fcn