helper to get trace begin/end stamps
moving code around