secondinversion method