fixing to allow further outputs, e.g., dalpha and dWinv
initial import
initial import
clarifying comments