improve tcd protocol parser