inversion count added