introduced bug in path energy analysis