added support for sending formats from js-wrapper