fixes
fixes
trw for weak loss (higher order energy)
move unused code