added receive buffer optimizations