basic trace logic