added method to write jsonp data