ok, here goes nothing
calculation now appears to be correct
joint effects case-only working
build of the day