recreated decisiontracer function
fixed bugs