added new code for dealing with dynamic tcp data