beg leave adjustment in JS