refactor sendAndRecv yet again + fix a bug in recovery