corrected error and added TODO for sent msgs