add support for binary output