add trace to main