adding some doc strings
fix bug in receive, add a few examples
moved this