consolidate UDP parsing in helper class