changed inf numbers of occurences to INT_MAX