Calculate nextgen

Corrections in nextgen calculation