adding support for js external calls.