move capsuleContextPortPair to .util