adds inversion counting problem