changed send and recv data to use pickling