getting client execution code together, serializing mongo cursors