match trace function