first 'working' version of send/receive