added support for emitting buffers, and using buffers with send