corrected nymi and simplify integration