added support for batch sends  and receives