added tcp support + example