better send/recv abstraction