improvements for icp trace (serialization of data)