uses less memory, best ranking array is not needed